{ext->countArray assign="c" array=$data.galer}
{if $c > 0}
<form action="" method="post">
<input name="admin" type="hidden" value="1">
<input name="body" type="hidden" value="{$smarty.session.body}">
<input name="show_menu" type="hidden" value="{$smarty.get.show_menu}">
<input name="mod" type="hidden" value="galery">
<input name="act" type="hidden" value="add">
<input name="parent" type="hidden" value="{$data.page.id}">
<table width="200" border="1"><tr>
{foreach from=$data.galer item=gl}
	<td>
		<a href="?admin=1&id={$data.page.id}&body=admin/body/content.htm&show_menu=galer&name_edit=1">{$gl.name}</a><br>
		<img src="get_image.php?i.{$gl.id}:w.50:h.50"><br>
		(<a href="?admin=1&lang={$data.page.lang}&mod=catalog&act=up&id={$gl.id}&body=admin/body/content.htm&show_menu=galer">+</a>)
		(<a href="?admin=1&lang={$data.page.lang}&mod=catalog&act=down&id={$gl.id}&body=admin/body/content.htm&show_menu=galer">-</a>)
		(<a onClick="if (confirm('\nDo you want\ndeletethis file?')) location.href='?admin=1&lang={$data.page.lang}&mod=galery&act=del_undo&id={$gl.id}&body=admin/body/content.htm&show_menu=galer'" href="#">x</a>)<br>
		{if $gl.hide == '1'} / (<a href=?admin=1&lang={$data.page.lang}&mod=galery&act=hid&hide=0&id={$gl.id}&p={$smarty.get.id}&body=admin/body/content.htm target="_parent">V</a>){/if}
		{if $gl.hide == '0'} / (<a href=?admin=1&lang={$data.page.lang}&mod=galery&act=hid&hide=1&id={$gl.id}&p={$smarty.get.id}&body=admin/body/content.htm target="_parent">H</a>){/if}
		{foreach from=$data.product item=el}
			{if ($el.value == $gl.id) and ($el.name=='front_image')}
				<input checked name="curent" type="radio" value="{$gl.id}">
			{elseif ($el.value <> $gl.id) and ($el.name=='front_image')}
				<input name="curent" type="radio" value="{$gl.id}">
			{/if}
		{/foreach}
		{if $smarty.get.name_edit == 1}<br>
			<form action="" method="post">
			<input name="admin" type="hidden" value="1">
		    <input name="body" type="hidden" value="{$smarty.session.body}">
			<input name="show_menu" type="hidden" value="{$smarty.get.show_menu}">
			<input name="mod" type="hidden" value="galery">
			<input name="act" type="hidden" value="name_mod">
			<input name="id" type="hidden" value="{$gl.id}">
 			<input name="parent" type="hidden" value="{$data.page.id}">
			<input name="name" size="5" type="text" value="">
			<input type="submit" value="Gerai">
			</form>
		{/if}
</td>
{/foreach}
</tr></table>
<input type="submit" value="Gerai">
</form>
{/if}
<FORM ENCTYPE="multipart/form-data" ACTION="?admin=1&body={$smarty.session.body}&show_menu={$smarty.get.show_menu}&mod=galery&act=add&parent={$data.page.id}"  method="post">
File: <INPUT NAME="img_file1" TYPE="file"><br>
Name: <INPUT NAME="img_name1" TYPE="text"><br>
<INPUT TYPE="submit" VALUE="Send">
</FORM>